package summary;

/**
 * @Author: 海琳琦
 * @Date: 2022/7/18 20:54
 */
public class Title557 {

    public String reverseWords(String s) {
        //
        StringBuilder result = new StringBuilder();
        String[] split = s.split(" ");
        for (int i = 0; i < split.length; i++) {
            for (int j = split[i].length() - 1; j >= 0; j--) {
                result.append(split[i].charAt(j));
            }
            if (i != split.length - 1) {
                result.append(" ");
            }
        }
        return result.toString();
    }

    public static void main(String[] args) {

    }
}
